package com.hrm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hrm.dao.WorkingDao;
import com.hrm.pojo.Working;

@Service
@Transactional
public class WordingService {

	private WorkingDao dao ;
	
	@Transactional(readOnly=true)
	public Working findName(String workName) {
		return dao.findByUnique("names", workName);
	}
	
	@Transactional(readOnly=true)
	public List<Working> findAll() {
		return dao.findAll();
	}

	
	@Autowired
	public void setDao(WorkingDao dao) {
		this.dao = dao;
	}


	
	
}
